#coding=utf-8
import sys
class Const(object):
    def __setattr__(self, name, value):
        if name in self.__dict__:
            raise TypeError("常量无法改变 (%s)" %name)
        if not name.isupper():
            raise  TypeError("常量名必须由大写字母组成！(%s)" %name)
        self.__dict__[name] = value

sys.modules[__name__]=Const()

